package com.ydgk.jishuzhan.service.impl;



import com.ydgk.jishuzhan.beans.Message;
import com.ydgk.jishuzhan.dao.MessageMapper;
import com.ydgk.jishuzhan.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MessageServiceImpl implements MessageService{

    @Autowired
    private MessageMapper messageMapper;

    @Override
    public List<Message> getMessages(Map<String, Object> map) {
        return messageMapper.getMessages(map);
    }

    @Override
    public Integer queryMessageTotal(Map<String, Object> map) {
        return messageMapper.queryMessageTotal(map);
    }

    @Override
    public Message findMessage(Integer id) {
        return messageMapper.findMessage(id);
    }

    @Override
    public void setRead(Integer id) {
        messageMapper.setRead(id);
    }

    @Override
    public void batchDelete(Integer[] ids) {
        messageMapper.batchDelete(ids);
    }

    @Override
    public void deleteById(Integer id) {
        messageMapper.deleteById(id);
    }
}
